/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package logic;

import java.sql.Connection;
import java.util.ArrayList;
import java.util.Properties;

/**
 *
 * @author Freshman
 */
public class Varpool {
    
    //Datenbankverbindung-------------------------------------------------------
    private Connection con;
    
    //Interne Voreinstellungen - Externe: Siehe config File
    private String dbname = "";     //Datenbankname
    private String loginname = "";  //Loginname
    private String password = "";   //Loginpasswort
    //Externe Einstellungen
    private Properties properties = new Properties();
    //--------------------------------------------------------------------------
    
    //SQL Daten-----------------------------------------------------------------
    private ArrayList<DataTable> dTab = new ArrayList(); //SQL-Tabellenklasse
    //--------------------------------------------------------------------------
    
    //Liste der Änderungen in den Tabellen und Redo-Liste
    private ArrayList<Alteration> alter = new ArrayList(); //Änderungenliste
    private ArrayList<Alteration> redo = new ArrayList(); //Liste für Redo's
    private ArrayList<DataTable> dTemp; //Temporäre Liste der Tabellen für die Speicherung in eine Datei
    //--------------------------------------------------------------------------
    
    //GETTER AND SETTER---------------------------------------------------------
    public Connection getCon() {
        return con;
    }

    public void setCon(Connection con) {
        this.con = con;
    }

    public String getDbname() {
        return dbname;
    }

    public void setDbname(String dbname) {
        this.dbname = dbname;
    }

    public String getLoginname() {
        return loginname;
    }

    public void setLoginname(String loginname) {
        this.loginname = loginname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public ArrayList<DataTable> getDataTable() {
        return dTab;
    }

    public void setDataTable(ArrayList<DataTable> dTab) {
        this.dTab = dTab;
    }
        
    public ArrayList<Alteration> getAlt() {
        return alter;
    }

    public void setAlt(ArrayList<Alteration> alt) {
        this.alter = alt;
    }
    
    public void addAlt(Alteration a) {
        this.alter.add(a);
    }
    
    public ArrayList<Alteration> getRedo() {
        return redo;
    }

    public void setRedo(Alteration redo) {
        this.redo.add(redo);
    }

    public ArrayList<DataTable> getdTemp() {
        return dTemp;
    }

    public void setdTemp(ArrayList<DataTable> dTemp) {
        this.dTemp = dTemp;
    }
    
    public Properties getProperties() {
        return properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }
    //--------------------------------------------------------------------------
}
